package com.Input.KeyBoard;

import com.Input.InputManager;
import javafx.event.EventHandler;
import javafx.scene.input.KeyCode;
import javafx.scene.input.KeyEvent;

import java.util.concurrent.ConcurrentLinkedQueue;


public class KeyPress implements EventHandler<KeyEvent> {

    @Override
    public void handle(KeyEvent keyEvent) {
        KeyCode code = keyEvent.getCode();
        if (code == KeyCode.J) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.K) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.L) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.W) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.D) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.A) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.S) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.U) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.I) {
            InputManager.getPressed().add(code);

        }
        if (code == KeyCode.O) {
            InputManager.getPressed().add(code);

        }
    }
}
